// RibbonUIView.cpp : implementation file
//

#include "stdafx.h"
#include "AutoSelect.h"
#include "RibbonUIView.h"


// CRibbonUIView

IMPLEMENT_DYNCREATE(CRibbonUIView, CView)

CRibbonUIView::CRibbonUIView()
{

}

CRibbonUIView::~CRibbonUIView()
{
}

BEGIN_MESSAGE_MAP(CRibbonUIView, CView)
//	ON_COMMAND(ID_DATABASE_CONNECT, &CRibbonUIView::OnRibbonDatabaseConnect)
//	ON_COMMAND(ID_DATABASE_CONFIGURATION, &CRibbonUIView::OnRibbonDatabaseConfiguration)
//	ON_UPDATE_COMMAND_UI(ID_DATABASE_CONNECT, &CRibbonUIView::OnUpdateDatabaseConnect)
	ON_COMMAND(ID_DATABASE_CONNECT, &CRibbonUIView::OnDatabaseConnect)
	ON_UPDATE_COMMAND_UI(ID_DATABASE_CONNECT, &CRibbonUIView::OnUpdateDatabaseConnect)
	ON_COMMAND(ID_DATABASE_DISCONNECT, &CRibbonUIView::OnDatabaseDisconnect)
	ON_UPDATE_COMMAND_UI(ID_DATABASE_DISCONNECT, &CRibbonUIView::OnUpdateDatabaseDisconnect)
END_MESSAGE_MAP()


// CRibbonUIView drawing

void CRibbonUIView::OnDraw(CDC* pDC)
{
	CDocument* pDoc = GetDocument();
	// TODO: add draw code here
}


// CRibbonUIView diagnostics

#ifdef _DEBUG
void CRibbonUIView::AssertValid() const
{
	CView::AssertValid();
}

#ifndef _WIN32_WCE
void CRibbonUIView::Dump(CDumpContext& dc) const
{
	CView::Dump(dc);
}
#endif
#endif //_DEBUG


// CRibbonUIView message handlers


//void CRibbonUIView::OnRibbonDatabaseConnect()
//{
//	// TODO: Add your command handler code here
//	AfxMessageBox(_T("Hello RibbonUI!"));
//
//}


//void CRibbonUIView::OnRibbonDatabaseConfiguration()
//{
//	// TODO: Add your command handler code here
//	AfxMessageBox(_T("Goodbye RibbonUI!"));
//
//}


//void CRibbonUIView::OnUpdateDatabaseConnect(CCmdUI *pCmdUI)
//{
//	// TODO: Add your command update UI handler code here
//	pCmdUI->SetCheck(1);
//
//	BOOL enable = TRUE; // set flag to enable or disable the command.
//	pCmdUI->Enable(enable);
//
//
//}


void CRibbonUIView::OnDatabaseConnect()
{
	// TODO: Add your command handler code here
		AfxMessageBox(_T("Hello RibbonUI!"));
}


void CRibbonUIView::OnUpdateDatabaseConnect(CCmdUI *pCmdUI)
{
	// TODO: Add your command update UI handler code here
}


void CRibbonUIView::OnDatabaseDisconnect()
{
	// TODO: Add your command handler code here
		AfxMessageBox(_T("Hello RibbonUI!"));
}


void CRibbonUIView::OnUpdateDatabaseDisconnect(CCmdUI *pCmdUI)
{
	// TODO: Add your command update UI handler code here
}
